package org.dtrd.modules.doctor.entity.po;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Getter;
import lombok.Setter;
import org.dtrd.modules.doctor.entity.bean.DoctorSigninSuggestDetail;

import java.util.Date;


/**
 * <p>
 * 医生端打卡建议
 * </p>
 *
 * @author 5146
 * @since 2022-04-08
 */
@Getter
@Setter
@TableName("dtrd_ent_rd_doctor_signin_suggest")
public class DtrdEntRdDoctorSigninSuggest {

    @TableId(value = "data_id", type = IdType.AUTO)
    private Integer dataId;

    @TableField("doctor_id")
    private Integer doctorId;

    @TableField("team_id")
    private Integer teamId;

    /**
     * 打卡项目:1 血糖；2血压；3运动；4用药；5 饮食；6 体重；7腰围；8尿酮；9 胰岛素；10睡眠；11总结；12生活方式；13营养素
     */
    @TableField("signin_type")
    private Integer signinType;

    /**
     * 机构编码
     */
    @TableField("org_code")
    private String orgCode;

    /**
     * 建议内容
     */
    @TableField("suggest_content")
    private String suggestContent;

    @TableField("update_by")
    private Integer updateBy;

    @TableField("update_time")
    private Date updateTime;

    @TableField("create_time")
    private Date createTime;

    @TableField("is_del")
    @TableLogic
    private Integer isDel;

    public DtrdEntRdDoctorSigninSuggest init() {
        createTime = new Date();
        isDel = 0;
        return this;
    }

    public DtrdEntRdDoctorSigninSuggest parseFromDto(DoctorSigninSuggestDetail dto) {
        dataId = dto.getDataId();
        doctorId = dto.getDoctorId();
        teamId = dto.getTeamId();
        signinType = dto.getSigninType();
        orgCode = dto.getOrgCode();
        suggestContent = dto.getSuggestContent();
        return this;
    }


}
